<?PHP
include("../config/connect.php");
include("../public/common.php");

$email = trim(CheckUrlParamNoDie("email"));
$nickname = trim(CheckUrlParamNoDie("nickname"));

if( $email != "" || $nickname != "")
{
	if ($email != "")
		$sql = "select id from tsj_user where email='$email' limit 1";
	else
		$sql = "select id from tsj_user where nick_name='$nickname' limit 1";
		
	$result = mysql_query( $sql );
	if (mysql_num_rows($result) == 0)
	{
		echo "{'code':1,'has_user':0}";
		exit;
	}
	else
	{
		echo "{'code':1,'has_user':1}";
		exit;
	}
}

echo "{'code':0}";
?>